package cn.edu.ctbu.myblog.dao;

import cn.edu.ctbu.myblog.domain.UserDO;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@org.apache.ibatis.annotations.Mapper
public interface UserDAO extends Mapper<UserDO>{
    @Select("select * from user")
    public List<UserDO> findAll();

    @Select("select * from user where id=#{id}")
    public List<UserDO> findById(int id);

    @Select("select * from user where userName=#{userName} and userPassword=#{userPassword}")
    public List<UserDO> findByUserNameAndPassword(String userName,String userPassword);
}